﻿//
// Created: 2018/8/21
// Author: chenqiang
//
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using Model.WXshopBuiness;

namespace Model.WXshopBuiness.Map
{
    internal  class WXProductMap:EntityTypeConfiguration< WXProduct >    
    {
        public WXProductMap()
        {
             this.ToTable("WeiXin_Product");
             this.HasKey(i => new { i.ProductID });
             this.Property(i => i.ProductID).HasColumnName("ProductID");                     
             this.Property(i => i.CategoryID).HasColumnName("CategoryID");                     
             this.Property(i => i.ProductName).HasColumnName("ProductName");                     
             this.Property(i => i.ProductCode).HasColumnName("ProductCode");                     
             this.Property(i => i.ShortDesc).HasColumnName("ShortDesc");                     
             this.Property(i => i.DetailDesc).HasColumnName("DetailDesc");                     
             this.Property(i => i.CreateTime).HasColumnName("CreateTime");                     
             this.Property(i => i.VistiCounts).HasColumnName("VistiCounts");                     
             this.Property(i => i.StartVistiCounts).HasColumnName("StartVistiCounts");                     
             this.Property(i => i.IsShowVistiCounts).HasColumnName("IsShowVistiCounts");                     
             this.Property(i => i.SaleCounts).HasColumnName("SaleCounts");                     
             this.Property(i => i.StartSaleCounts).HasColumnName("StartSaleCounts");                     
             this.Property(i => i.IsShowSaleCounts).HasColumnName("IsShowSaleCounts");                     
             this.Property(i => i.ImageUrl1).HasColumnName("ImageUrl1");                     
             this.Property(i => i.ImageUrl2).HasColumnName("ImageUrl2");                     
             this.Property(i => i.ImageUrl3).HasColumnName("ImageUrl3");                     
             this.Property(i => i.ImageUrl4).HasColumnName("ImageUrl4");                     
             this.Property(i => i.ImageUrl5).HasColumnName("ImageUrl5");                     
             this.Property(i => i.ImageUrl6).HasColumnName("ImageUrl6");                     
             this.Property(i => i.ImageUrl7).HasColumnName("ImageUrl7");                     
             this.Property(i => i.ImageUrl8).HasColumnName("ImageUrl8");                     
             this.Property(i => i.ImageUrl9).HasColumnName("ImageUrl9");                     
             this.Property(i => i.ThumbnailUrl1).HasColumnName("ThumbnailUrl1");
            this.Property(i => i.Domain).HasColumnName("Domain");
            this.Property(i => i.ThumbnailUrl2).HasColumnName("ThumbnailUrl2");                     
             this.Property(i => i.MarketPrice).HasColumnName("MarketPrice");                     
             this.Property(i => i.CostPrice).HasColumnName("CostPrice");                     
             this.Property(i => i.SalePrice).HasColumnName("SalePrice");                     
             this.Property(i => i.Stock).HasColumnName("Stock");                     
             this.Property(i => i.Weight).HasColumnName("Weight");                     
             this.Property(i => i.IsFreeShipping).HasColumnName("IsFreeShipping");                     
             this.Property(i => i.State).HasColumnName("State");                     
             this.Property(i => i.SortID).HasColumnName("SortID");                     
             this.Property(i => i.Remark).HasColumnName("Remark");                     
             this.Property(i => i.IsUpgradeProduct).HasColumnName("IsUpgradeProduct");                     
             this.Property(i => i.GradeID).HasColumnName("GradeID");                     
             this.Property(i => i.CommissionRule).HasColumnName("CommissionRule");                     
             this.Property(i => i.UseMaxScore).HasColumnName("UseMaxScore");                     
             this.Property(i => i.ProductType).HasColumnName("ProductType");                     
             this.Property(i => i.MerchantID).HasColumnName("MerchantID");                     
             this.Property(i => i.SubType).HasColumnName("SubType");                     
             this.Property(i => i.Size).HasColumnName("Size");                     
             this.Property(i => i.ProductKeyword).HasColumnName("ProductKeyword");                     
             this.Property(i => i.BrandModel).HasColumnName("BrandModel");                     
             this.Property(i => i.Color).HasColumnName("Color");                     
             this.Property(i => i.UpdateTime).HasColumnName("UpdateTime");                     
             this.Property(i => i.Creator).HasColumnName("Creator");                     
             this.Property(i => i.Updator).HasColumnName("Updator");                     
             this.Property(i => i.ShowOnWhere).HasColumnName("ShowOnWhere");                     
             this.Property(i => i.Stars).HasColumnName("Stars");                     
             this.Property(i => i.Spec1).HasColumnName("Spec1");                     
             this.Property(i => i.Spec2).HasColumnName("Spec2");                     
             this.Property(i => i.Spec3).HasColumnName("Spec3");                     
             this.Property(i => i.Spec4).HasColumnName("Spec4");                     
             this.Property(i => i.Spec5).HasColumnName("Spec5");
             this.Property(i => i.Site).HasColumnName("Site");
             this.Property(i => i.CategoryName).HasColumnName("CategoryName");
             this.Property(i => i.FileId1).HasColumnName("FileId1");
             this.Property(i => i.FileId2).HasColumnName("FileId2");
             this.Property(i => i.FileId3).HasColumnName("FileId3");
             this.Property(i => i.FileId4).HasColumnName("FileId4");
             this.Property(i => i.FileId5).HasColumnName("FileId5");
             this.Property(i => i.FileId6).HasColumnName("FileId6");
             this.Property(i => i.FileId7).HasColumnName("FileId7");
             this.Property(i => i.FileId8).HasColumnName("FileId8");
             this.Property(i => i.FileId9).HasColumnName("FileId9");
             this.Property(i => i.PromotionId).HasColumnName("PromotionId");
            this.Property(i => i.VideoType).HasColumnName("VideoType");
            this.Property(i => i.VideoUrl).HasColumnName("VideoUrl");
            this.Property(i => i.ShowStyle).HasColumnName("ShowStyle");
            


        }   
    }
    
     public static class WXProductMapExtensions
    {
        public static void UserWXProductMap(this DbModelBuilder pModelBuilder)
        {
            pModelBuilder.Configurations.Add(new WXProductMap());
        }
    }
}